home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Language/OS - Multiplatform Resource Library
/
LANGUAGE OS.iso
/
oper_sys
/
oasis
/
oasis1-1.lha
/
oasis-1.1
/
system.h
< prev
next >
Wrap
C/C++ Source or Header
|
1992-05-01
|
6KB
|
187 lines
/*==========================================================================*
Oasis Alpha Version 1.1 (C) Copyright 1992 Fah-Chun Cheong
Revised: 5/1/92 by: fcc@eecs.umich.edu and The University of Michigan
------------------------------------------------------------------------
Permission to use, copy, modify, distribute, sell and resell Oasis Alpha
software and its documentation for any purpose and without fee is hereby
granted, provided that the authorship be appropriately credited and
acknowledged, and that the above copyright notice appear in all copies
and both the copyright notice and this permission notice appear in
supporting documentation. The author makes no representations about the
suitability of this software for any purpose. It is provided "as is"
without express or implied warranty. Oasis Alpha is free, caveat emptor!
------------------------------------------------------------------------
To request Oasis Alpha source code: oasis-alpha-request@eecs.umich.edu
To enroll in the mailing list: oasis-alpha-request@eecs.umich.edu
To send bug reports: oasis-alpha-bugs@eecs.umich.edu
To discuss openly all matters Oasis: oasis-alpha@eecs.umich.edu
*==========================================================================*/
#include <stdio.h>
#ifdef apollo
#define VOID int
#else
#define VOID void
#endif apollo
#define NUL 0
#define T_CHAR 0x0008000f
#define T_INT 0x000c000f
#define T_FLOAT 0x0010000f
#define T_POINTER 0x0014000f
#define H_ROOT 0x00001003
#define H_HANDLE 0x00040013
#define I_HANDLE 1
#define I_LISTC 2
#define I_LISTI 3
#define I_LISTF 4
#define I_LISTP 5
#define I_ARRAYC 6
#define I_ARRAYI 7
#define I_ARRAYF 8
#define I_ARRAYP 9
#define MDONE 0
#define MQUIT 1
#define MSEND 2
#define MCRET 3
#define SIZE 0
#define ENDIAN 1
#define START 2
#define MTYPE 3
#define ADDR 4
#define PORT 5
#define XID 6
#define MID 7
#define INO 8
#define ONO 9
#define HEADSZ 10
#define idof(p) (*(u_long *) p >> 18 & 0x3fff)
#define szof(p) (*(u_long *) p >> 2 & 0x3fff)
#define error0(s) fprintf(stderr, s)
#define error1(s,a) fprintf(stderr, s, a)
typedef struct sockaddr_in Socket;
typedef struct sockaddr Sock;
typedef struct _Host Host;
typedef struct _Space Space;
typedef struct _Thread Thread;
struct _Host {
u_long addr;
u_long port;
};
struct _Space {
u_long *heap;
u_long *next;
u_long *hp;
u_long *bp;
};
struct _Thread {
u_long *stack;
u_long *mp;
u_long *sb;
u_long *sp;
u_long *pc;
u_long**hook;
u_long *mbuf;
u_long addr;
u_long port;
u_long xid;
u_long ono;
u_long count;
Thread *next;
};
extern u_long getaddr();
extern int random();
extern int pick();
extern int readn();
extern int writn();
extern int csocket();
extern int ssocket();
extern char *itoa();
extern char *xtoa();
extern char *ntoa();
extern void logger();
extern void tracer();
extern void init_kern();
extern void stat_on();
extern void stat_off();
extern u_long run();
extern VOID on_fault();
extern VOID on_arrival();
extern void reorder();
extern u_long create();
extern void transmit();
extern Space *collect();
extern u_long *trace();
extern u_long *traverse();
extern u_long marshal();
extern void umarshal();
extern void mcret();
extern void msend();
extern u_long *mdone();
extern u_long *mquit();
extern u_long *mrecv();
extern void tinit();
extern void tmove();
extern Thread *twait();
extern u_long *cwait();
extern void cpost();
extern void zero();
extern char *alloc();
extern long iceil();
extern long ifloor();
extern long iround();
extern long itrunca();
extern double ffloat();
extern u_long *dbug();
#if defined(M68K) || defined(I386)
extern u_long *call();
#else
#define call exec
#endif M68K || I386
extern u_long *exec();
extern void done();
extern void quit();
extern u_long ftow();
extern double wtof();
extern double drem();
extern double ceil();
extern double floor();
extern double sqrt();
extern double sin();
extern double cos();
extern double tan();
extern double asin();
extern double acos();
extern double atan();
extern double sinh();
extern double cosh();
extern double tanh();
extern double asinh();
extern double acosh();
extern double atanh();
extern double log10();
extern double logb();
extern double log();
extern double log1p();
extern double pow();
extern double exp();
extern double expm1();